package com.liangsui.cmall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liangsui.cmall.order.vo.*;
import com.liangsui.common.to.mq.SeckillOrderTo;
import com.liangsui.common.utils.PageUtils;
import com.liangsui.cmall.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author zhangjiawei
 * @email 1533167396@qq.com
 * @date 2022-08-03 23:19:27
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 订单确认页返回数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderStatus(String orderSn);

    void closeOrder(OrderEntity entity);

    /**
     * 获取当前订单支付的信息
     * @param orderSn
     * @return
     */
    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);
}

